//
//  UIImage+Convenience.h
//  golfMaster
//
//  Created by 宋鹏程 on 14-4-8.
//  Copyright (c) 2014年 宋鹏程. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (Convenience)

//- (instancetype)scaleToSize:(CGSize)size;

+(instancetype)scaleAspectFitImage:(UIImage*)aImage ToSize:(CGSize)aSize;

-(UIImage*)imageByScalingToMaxSize:(UIImage *)sourceImage;
+(UIImage *)resizedImageNamed:(NSString *)name;

/**
 拉伸图片，上下拉伸，拉伸中间1像素。左右拉伸，保留左右5像素，中间平铺
 */
+(UIImage *)resizedImageBuyCup:(NSString *)name;

/**
    根据颜色生成图片
 */
+ (UIImage *) createImageWithColor: (UIColor *) color;

@end
